package task3;

import java.util.Stack;

public class test6 {
    public static void main(String[] args) {
        Stack<Character> stack=new Stack<>();
        stack.push('(');
        stack.push('(');
        stack.push(')');
        stack.push(')');
        System.out.println(stack.lastIndexOf('('));
        System.out.println(stack.indexOf(')'));
    }
}
